package ee.serge.service;

import java.util.List;

import com.google.gwt.user.client.rpc.AsyncCallback;

import ee.serge.shared.Admin;
import ee.serge.shared.Feedback;
import ee.serge.shared.HandledException;
import ee.serge.shared.IPFeedbackData;
import ee.serge.shared.Loan;

public interface ControlPanelServiceAsync {

   void registerAccount(Admin admin, AsyncCallback<Void> callback);
   
   void removeAccount(String username, AsyncCallback<Void> callback);
   
   void getAccountList(AsyncCallback<List<Admin>> callback);
   
   void login(String name, String password, AsyncCallback<Boolean> callback);
   
   void logout(AsyncCallback<Void> callback);
   
   void isLoggedIn(AsyncCallback<Boolean> callback);
   
   void getLoans(AsyncCallback<List<Loan>> callback);
   
   void addLoan(Loan loan, AsyncCallback<Void> callback);
   
   void getLoan(String key, AsyncCallback<Loan> callback);
   
   void removeLoan(String key, AsyncCallback<Void> callback);
   
   void saveLoan(Loan loan, AsyncCallback<Void> callback);
   
   void getFeedbackListWithIP(String ip, AsyncCallback<IPFeedbackData> callback); 
   
   void getFeedbackList(String loanKey, AsyncCallback<List<Feedback>> callback);
   
   void removeFeedback(String key, AsyncCallback<Void> callback);
   
   void banIP(String ip, AsyncCallback<Void> callback);
   
   void isBanned(String ip, AsyncCallback<Boolean> callback);
   
   void removeBan(String ip, AsyncCallback<Void> callback);
   
   void addFeedback(Feedback feedback, AsyncCallback<Void> callback);
   
}
